/*****************************************************************//**
 * \file   SurgicalRobotCamera.h
 * \brief  ����ͷ��ȡ������
 * 
 * \author Administrator
 * \date   July 2021
 * \modify by Administrator
 * \date   July 2021

 *********************************************************************/
#pragma once
#include <QObject>
#include <QDebug>
#include <QImage>
#include <QString>
#include <QThread>
#include <QTime>
#include <QApplication>
#include <include/SurgicalRobotCommunication.h>
#include "../hardware_interface/Camera/Camera.h"
using namespace std;
//using namespace cv;

class SurgicalRobotCamera :public QObject
{
	Q_OBJECT
public:
	Camera camera;
	int iSurgicalRobotCameraCount = 0;
public:
	SurgicalRobotCamera();
	~SurgicalRobotCamera();
	bool open(int index);
	void close();
	cv::Mat read();
	cv::Mat matNow;
	QImage Mat2QImage(cv::Mat const & srcMatData);
	cv::Mat QImage2Mat(QImage const &srcImage);

	int getSurgicalRobotCameraCount()
	{
		iSurgicalRobotCameraCount = Camera::getCameraCount();
	}
public :
signals:
	void updateImage(QImage const&);
	void updateImage();
public slots:
	void Operate(int);
};
